package work.parabola.keyboardswitch.pojo.query.manufacturer;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.apache.commons.lang3.StringUtils;
import work.parabola.keyboardswitch.common.ServerResponse;

@Data
@ToString
@EqualsAndHashCode
public class AddManuQuery {

    private String name;

    private String EnglishName;

    public ServerResponse validate() {
        if (StringUtils.isBlank(this.name)) {
            return ServerResponse.createByErrorMessage("厂商名称不能为空");
        }
        return ServerResponse.createBySuccess();
    }

}
